﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ThaireInvestmentWeb.WcfSerivce;

namespace ThaireInvestmentWeb.Models
{
    public class AmortizeLoanScheduleModel
    {
        public AmortizeLoanScheduleModel()
        {
            ScrData = new AmortizeLoanScheduleScreenData();
        }
        public AmortizeLoanScheduleModel(AmortizeLoanScheduleScreenData scrData)
        {
            ScrData = scrData;
            if (ScrData.LoanHeaderDTO != null && ScrData.LoanHeaderDTO.Period == null)
                ScrData.LoanHeaderDTO.Period = ScrData.Period.GetValueOrDefault();
        }
        public AmortizeLoanScheduleScreenData ScrData { set; get; }
        public int HeaderID { set; get; }
        public string Period
        {
            get
            {
                return ScrData.Period.GetValueOrDefault().ToString();
            }
        }
    }
}